    set (PROJECT 
                ../tbg-arm)

#    add_definitions( -DUSE_PTRACE )
     
    set (HEADERS 
                arm_utils.h
                check.h
                linux_arm_exidx_elf.h
                map_utils_linux_elf.h
                backtracer_arm_exidx.h
                debug.h
                linux_elf_utils.h
                map_utils_linux.h
                backtracer.h
                defs.h 
                linux_ptrace_utils.h
                memory_utils.h
                backtracer_linux_arm.h
                error_list.h 
                log.h
                backtracer_linux.h
                errors.h
                map_utils.h)
     
    set (SOURCES
                main.c
                arm_utils.c
                errors.c
                backtracer_arm_exidx.c
                map_utils.c
                backtracer.c   
                linux_arm_exidx_elf.c
                map_utils_linux.c
                backtracer_linux_arm.c
                linux_elf_utils.c
                map_utils_linux_elf.c
                backtracer_linux.c
                linux_ptrace_utils.c 
                memory_utils.c
                debug.c   
                log.c)
     
    project (${PROJECT})
     
    include_directories (.)
     
    if (MSVC)
        add_definitions (/W3)
    elseif (CMAKE_COMPILER_IS_GNUCC)
        add_definitions (-Wall -funwind-tables)
    else ()
        message ("Unknown compiler")
        endif ()
     
    source_group ("Header Files" FILES ${HEADERS})
    source_group ("Source Files" FILES ${SOURCES})
     
    add_executable (${PROJECT} ${HEADERS} ${SOURCES})

